package com.imooc.reader.portal.service.impl.exception;

import lombok.Data;

@Data
public class BusinessException extends RuntimeException{
    private String code;
    private String message;

    public BusinessException(String message){
        this.message = message;
    }

    public BusinessException(String code, String message){
        this.code = code;
        this.message = message;
    }

    public BusinessException(Throwable t){
        super(t);
    }
    @Override
    public String getMessage(){
        return this.message;
    }
}
